import com.nextlink.chinesechess.Piece
class Board {

    def boardMap=[:]

    static constraints = {
    }
    def initBoard(){
        boardMap[1,1]=new Piece(Piece.tJu,Piece.cRed)
        boardMap[9,1]=new Piece(Piece.tJu,Piece.cRed)
        boardMap[2,1]=new Piece(Piece.tMa,Piece.cRed)
        boardMap[8,1]=new Piece(Piece.tMa,Piece.cRed)
        boardMap[3,1]=new Piece(Piece.tXiang,Piece.cRed)
        boardMap[7,1]=new Piece(Piece.tXiang,Piece.cRed)
        boardMap[4,1]=new Piece(Piece.tShi,Piece.cRed)
        boardMap[6,1]=new Piece(Piece.tShi,Piece.cRed)
        boardMap[5,1]=new Piece(Piece.tJiang,Piece.cRed)
        boardMap[2,3]=new Piece(Piece.tPao,Piece.cRed)
        boardMap[8,3]=new Piece(Piece.tPao,Piece.cRed)
        boardMap[1,4]=new Piece(Piece.tBin,Piece.cRed)
        boardMap[3,4]=new Piece(Piece.tBin,Piece.cRed)
        boardMap[5,4]=new Piece(Piece.tBin,Piece.cRed)
        boardMap[7,4]=new Piece(Piece.tBin,Piece.cRed)
        boardMap[9,4]=new Piece(Piece.tBin,Piece.cRed)
    }
    def getBoard ={
        return boardMap
    }
}
